<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$setting.webname}-报名记录</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link rel="shortcut icon" href="/public/static/admin/uploads/set/{$setting['ico']}">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
    <script type="text/javascript" src="/public/static/home/themes/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/slider.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/tab.js"></script>
    <style>
        .tel{
            display: block;
            border: 1px solid #1d3491;
            margin: 10px auto;
            height: 40px;
            line-height: 40px;
            background: #1d3491;
            color: #fff;
            border-radius: 22px;
            width: 75%;
        }
    </style>
</head>
<body>

<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.back(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">报名记录</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-mate-box">
            {foreach $apply as $vs}
            <a {if condition="$vs.status == 4"}href="{:url('My/pay',['id'=>$vs.id])}"{elseif condition="$vs.status == 2"}href="{:url('My/tzs',['id'=>$vs.id])}"{/if} class="aui-flex b-line">
                <div class="aui-flex-box">
                    {if condition="!empty($vs.major)"}<h3>{$vs.major} / {$vs.major2}</h3>{/if}
                    <p>报考类型：{$vs.bktype}</p>
                    <p>报名时间：{$vs.create_time}</p>
                    <p>
                        {if condition="$vs.status==5"}
                        <span style="color:#f8ac59"><i class="fa fa-thumb-tack"></i> 报名审核中，请耐心等待……</span>
                        {elseif condition="$vs.status==3" /}
                        <span style="color:#2b57d9;"><i class="fa fa-times"></i>
                            {$vs.reason}
                        </span>
                        {elseif condition="$vs.status==4" /}
                        <span style="color:#d9534f;">本专业名额有限，请尽快缴纳预报名：{$setting.money_ybmf}元</span>
                        {elseif condition="$vs.status==1" /}
                        <span style="color:#f8ac59"><i class="fa fa-thumb-tack"></i> 缴费核对中，请耐心等待……</span>
                        <button></button>
                        {/if}
                    </p>
                </div>
                <div class="aui-mate-text">
                    <p>
                        {if condition="$vs.status==1"}
                        <span style="color:#f8ac59"><i class="fa fa-thumb-tack"></i> 缴费核对中</span>
                        {elseif condition="$vs.status==2" /}
                        <span style="color:green"><i class="fa fa-check"></i> 已录取</span>
                        {elseif condition="$vs.status==3" /}
                        <span style="color:#2b57d9;"><i class="fa fa-times"></i> 拒绝</span>
                        {elseif condition="$vs.status==4" /}
                        <span style="color:#d9534f;"><i class="fa fa-times"></i> 待支付 </span>
                        {elseif condition="$vs.status==5" /}
                        <span style="color:#f8ac59;"><i class="fa fa-times"></i> 报名审核中 </span>
                        {/if}
                    </p>

                </div>
                <!--<div class="aui-mate-text">-->
                <!--<i class="fa fa-angle-right"></i>-->
                <!--</div>-->
            </a>
            {if condition="$vs.status==4" /}
            <a class="tel" style="background:green;border-color:green;text-align: center" href="{:url('My/pay',['id'=>$vs.id])}">立即去支付预报名费</a>
            {elseif condition="$vs.status==2" /}
            <a class="tel" style="background:green;border-color:green;text-align: center" href="{:url('My/tzs',['id'=>$vs.id])}">查看我的报到证</a>
            {/if}
            {/foreach}
            <div style="text-align: center;color:#999;font-size:16px;margin:15px;">
                <div style="height: 40px;margin:10px 0px;background:url(/public/static/home/themes/img/img/640.gif) no-repeat center;background-size:auto 100%;"></div>
                {if condition="empty($teacher.wx_qrcode)"}
                    如有疑问请联系我校老师<br/>
                    <img src="/public/static/admin/uploads/set/{$qrcode.val}" alt="" height="150"><br/>
                    <span>{$qrcode.description}</span><br/>
                    <a class="tel" href="tel:{$setting.gf_tel}">联系电话：{$setting.gf_tel}</a>

                {else /}
                    如有疑问请联系我校老师<br/>
                    <img src="/public/static/admin/uploads/teacher_qr/{$teacher.wx_qrcode}" alt="" height="150"><br/>
                    <span>我校老师：{$teacher.name}</span><br/>
                    <span><a class="tel" href="tel:{$teacher.tel}">联系电话：{$teacher.tel}</a></span>
                <section class="_editor"  data-style-id="25113">
                    <section style="margin-top: 10px; margin-bottom: 10px;">
                        <p style="text-align: center; width:100%;" data-width="100%">
                            <br/>
                        </p>
                    </section>
                </section>

                <section style="margin-top: 10px; margin-bottom: 10px;">
                    <p style="text-align: center;width:6em;">
                        <img src="/public/static/home/themes/img/img/0.gif"/>
                    </p>
                    <section style="margin-top:-10px;background-color:#beffbb;border-radius:5px;" class="">
                        <section style="background-image: url(/public/static/home/themes/img/img/10001.gif); background-position: 100% 100%; background-repeat: no-repeat; background-attachment: scroll; background-size: 13%; padding: 15px; text-align: center;" class="">
                            <p style="letter-spacing: 2px;">
                                <span style="color: #0052ff;" onclick="share()">分享我的学校</span>
                            </p>
                            <p style="letter-spacing: 2px;">
                                点击上面“蓝字”分享我的学校哦！
                            </p>
                        </section>
                    </section>
                </section>

                {/if}

            </div>
        </div>
    </section>
    {include file="public/footer3"}
</section>
<script src="/public/static/home/js/jquery.min.js"></script>
<script src="/public/static/admin/layui/layui.js"></script>

<script>
    layui.use('upload', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer, upload = layui.upload; //独立版的layer无需执行这一句
    //分享
    window.share = () =>{
        var adv_str = `{$teacher.adv_str}`
        var adv_href = `{$teacher.adv_href}`
        if(adv_href == "" || adv_str == ""){
            console.log(adv_str,adv_href);
            layer.msg("分享地址失效",{time:2000,shade:0.8})
        }else{
            copyText(adv_str);
            window.location = adv_href
        }
    }

    });
    //复制文本
    function copyText(text){
        var textareaC = document.createElement('textarea');
        textareaC.setAttribute('readonly', 'readonly'); //设置只读属性防止手机上弹出软键盘
        textareaC.value = text;
        document.body.appendChild(textareaC); //将textarea添加为body子元素
        textareaC.select();
        var res = document.execCommand('copy');
        document.body.removeChild(textareaC);//移除DOM元素
        console.log("复制成功");
        return res;
    }
</script>
</body>
</html>